﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models.world.vos {
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.constants.*;
    import com.adobe.utils.*;

    public class TreatmentVO implements ITreatment {

        private var _id:String;
        private var _state:String;
        private var _coins:int;
        private var _xp:int;
        private var _roomType:String;
        private var _symbols:Object;
        private var _duration:int;
        private var _startedAt:int;
        private var _finishedAt:int;
        private var _finishedIn:int;
        private var _needsItem:String;

        public function TreatmentVO(_arg1:Object){
            this._id = _arg1[ProtocolConstants.ID];
            this._state = _arg1[ProtocolConstants.STATE];
            this._roomType = _arg1[ProtocolConstants.ROOM_TYPE];
            this._coins = ((_arg1[ProtocolConstants.COINS]) || (0));
            this._xp = ((_arg1[ProtocolConstants.XP]) || (0));
            this._startedAt = _arg1[ProtocolConstants.STARTED_AT];
            this._finishedAt = _arg1[ProtocolConstants.FINISHED_AT];
            this._finishedIn = _arg1[ProtocolConstants.FINISHED_IN];
            this._duration = _arg1[ProtocolConstants.DURATION];
            this._symbols = _arg1[ProtocolConstants.SYMBOLS];
            this._needsItem = _arg1[ProtocolConstants.NEEDS_ITEM];
        }
        public function get id():String{
            return (this._id);
        }
        public function get state():String{
            return (this._state);
        }
        public function set state(_arg1:String):void{
            this._state = _arg1;
        }
        public function finish():void{
            this._state = WorldConstants.FINISHED;
        }
        public function get isFinished():Boolean{
            return (((this._startedAt) && (!(this._finishedIn))));
        }
        public function finalize():void{
            this._state = WorldConstants.FINALIZED;
        }
        public function get isFinalized():Boolean{
            return ((this._state == WorldConstants.FINALIZED));
        }
        public function get roomType():String{
            return (this._roomType);
        }
        public function get isTreatment():Boolean{
            return (StringUtil.beginsWith(this._roomType, "Treatment"));
        }
        public function set startedAt(_arg1:int):void{
            this._startedAt = _arg1;
        }
        public function get startedAt():int{
            return (this._startedAt);
        }
        public function set finishedAt(_arg1:int):void{
            this._finishedAt = _arg1;
        }
        public function get finishedAt():int{
            return (this._finishedAt);
        }
        public function get duration():int{
            return (this._duration);
        }
        public function set finishedIn(_arg1:int):void{
            this._finishedIn = _arg1;
        }
        public function get finishedIn():int{
            return (this._finishedIn);
        }
        public function get xp():int{
            return (this._xp);
        }
        public function get coins():int{
            return (this._coins);
        }
        public function get symbols():Object{
            return (this._symbols);
        }
        public function get needsItem():String{
            return (this._needsItem);
        }
        public function set needsItem(_arg1:String):void{
            this._needsItem = _arg1;
        }

    }
}//package net.wooga.pets.models.world.vos 
